package a_exception.e_try;

//解决运行时异常 - 数组下标越界异常
public class Demo01Array {
    public static void main(String[] args) {
        m1();
    }

    public static void m1(){
        //1.制造运行时异常
        try{
            int[] arr = {1,2,3,4};
            System.out.println(arr[1]);
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("系统正在维修中....");
        }

    }
}
